//
//  WHAlertTool.m
//  AddressBook
//
//  Created by  on 2020/8/1.
//  Copyright © 2020 wh. All rights reserved.
//

#import <UIKit/UIKit.h>

#import "WHAlertTool.h"

@implementation WHAlertTool

+ (void)presentAlertWith:(NSString *)message
              controller:(nonnull UIViewController *)vc
             actionblock:(nonnull void (^)(void))block
{
    UIAlertController *alertVC = [UIAlertController alertControllerWithTitle:@"提示" message:message preferredStyle:UIAlertControllerStyleAlert];
    UIAlertAction *comfirmAc = [UIAlertAction actionWithTitle:@"确定" style:UIAlertActionStyleDefault handler:^(UIAlertAction * _Nonnull action) {
        block();
    }];
    [alertVC addAction:comfirmAc];
    [vc presentViewController:alertVC animated:YES completion:nil];
}


@end
